#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include "Polynomial.h"
#include "randsome.h"
using std::cout;
using std::endl;
using std::time;
using std::srand;

int main(int argc, const char *argv[])
{
    srand (time (0));

    const size_t SIZE = 10;
    int a[SIZE];
    int b[SIZE];

    std::generate_n (a, SIZE, randsome_number (-20, 20));
    std::generate_n (b, SIZE, randsome_number (-20, 20));

    Polynomial<int> tmp1(a, SIZE);
    Polynomial<int> tmp2(b, SIZE);

    cout << "a = " << tmp1 << endl;
    cout << "b = " << tmp2 << endl;
    cout << "a " << (a == b ? "=" : "!=") << " b" << endl;
    cout << "a " << (a == a ? "=" : "!=") << " a" << endl;
    cout << "\na + b = " << tmp1 + tmp2 << endl;
    cout << "a - b = " << tmp1 - tmp2 << endl;
    cout << "a * b = " << tmp1 * tmp2 << endl;
 
    return 0;
}
